package com.supreme.cacheserver.controller;

import com.supreme.commonboot.utils.AjaxResp;
import org.redisson.api.RBloomFilter;
import org.redisson.api.RedissonClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping(value = "bloom")
public class BloomController {

    @Resource
    private RedissonClient redissonClient;

    @GetMapping(value = "test")
    public AjaxResp test() {
        RBloomFilter<Object> userid = redissonClient.getBloomFilter("userid");
        return AjaxResp.instance();
    }
}
